package SwingDrawImage;

import javax.swing.*;
import java.awt.*;
import java.io.IOException;

public class MyFrame extends JFrame {
    public MyFrame() throws IOException {
        this.setSize(800, 600);
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);

        PictureView coder = new PictureView("D:\\code\\Java\\Swing\\src\\res\\a.jpg");
//        coder.setPreferredSize(this.getPreferredSize());
        this.setContentPane(coder);
        coder.setBgColor(Color.lightGray);
        this.setVisible(true);
    }
}
